package com.ed100.sass.patter.proxy.dynamic;

import java.lang.reflect.Proxy;

public class Main {

	public static void main(String[] args) {
		RealObject real = new RealObject();

		ProxyObject pObject = new ProxyObject(real);

		ProxyInterface pInterface = (ProxyInterface) Proxy.newProxyInstance(ProxyInterface.class.getClassLoader(),
				new Class[] { ProxyInterface.class }, pObject);
		
		pInterface.say();
	}

}
